// app.ts
App<IAppOption>({
  globalData: {
    islogin:false,
    voteuser:{},
    capsuleObj:{},
    titleHeight:{}
  },
  onLaunch() {
    let capsuleObj = wx.getMenuButtonBoundingClientRect();
    wx.getSystemInfo({
      success: (res) => {
        var statusBarHeight = res.statusBarHeight; //顶部状态栏高度
        this.globalData.capsuleObj = capsuleObj;
        this.globalData.titleHeight = statusBarHeight + capsuleObj.height + (capsuleObj.top - statusBarHeight) * 2;
        // console.log("设备参数：",this.globalData.capsuleObj);
        // console.log("自定义组件高度"+this.globalData.titleHeight);
      },
      failure() {
      }
    });
  },
})